﻿using System;
using System.ComponentModel;
using Loki;
using Loki.UI;
using Luna.Model;

namespace Luna.UI
{
    public class DisplayNamedEntity : Displayable<LunaModel>
    {
        #region  Description
        private static PropertyChangedEventArgs _DescriptionChangeArgs = ObservableHelper.CreateArgs<DisplayNamedEntity>(x => x.Description);

        private string _Description;

        public string Description
        {
            get
            {
                return _Description;
            }

            set
            {
                if (value != _Description)
                {
                    _Description = value;
                    NotifyChangedAndDirty(_DescriptionChangeArgs);
                }
            }
        }
        #endregion

        #region  Name
        private static PropertyChangedEventArgs _NameChangeArgs = ObservableHelper.CreateArgs<DisplayNamedEntity>(x => x.Name);

        private string _Name;

        public string Name
        {
            get
            {
                return _Name;
            }

            set
            {
                if (value != _Name)
                {
                    _Name = value;
                    NotifyChangedAndDirty(_NameChangeArgs);
                }
            }
        }
        #endregion

        #region  ID
        private static PropertyChangedEventArgs _IDChangeArgs = ObservableHelper.CreateArgs<DisplayNamedEntity>(x => x.ID);

        private Guid _ID;

        public Guid ID
        {
            get
            {
                return _ID;
            }

            set
            {
                if (value != _ID)
                {
                    _ID = value;
                    NotifyChangedAndDirty(_IDChangeArgs);
                }
            }
        }
        #endregion
    }
}
